import allure
from appium.webdriver.common.appiumby import AppiumBy

from tests.app.pages.member_and_department_management_page import MemberAndDepartmentManagementPage
from tests.app.pages.wecom import Wecom


class ManageEnterprisePage(Wecom):
    __MEMBER_AND_DEPARTMENT_MANAGEMENT = AppiumBy.XPATH, "//*[@text = '成员与部门管理']"
    @allure.step("跳转到成员与部门管理页面")
    def goto_member_and_department_management_page(self):
        self.find_and_click(self.__MEMBER_AND_DEPARTMENT_MANAGEMENT)
        return MemberAndDepartmentManagementPage(self.driver)